import React from 'react';
import Footer from '../calendar/footer';
import {  withRouter } from 'react-router-dom';

@withRouter
class App extends React.Component {
  componentDidMount() {

  }

  isFooterVisible = () => {
    const { pathname } = this.props.location;
    const { action } = this.props.history;
    let isVisible = true;
    if (pathname === '/roomPlan') {
      isVisible = false;
    }
    if (pathname.indexOf('detail') > -1 || pathname.indexOf('signResult') > -1) {
      isVisible = false;
    }
    return isVisible;
  }

  render() {
    return (
      <div style={{height: '100%'}}> 
        <div style={{}}>{this.props.children}</div>
        {this.isFooterVisible() && <Footer />}
      </div>
    )
  }
}

export default App;